package com.xsm.adapter;

import java.util.List;

import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.ViewGroup;

public class MypagerAdapter extends PagerAdapter{
	private List<View> viewlist;
public MypagerAdapter(List<View> viewlist){
	this.viewlist=viewlist;
}
	public int getCount() {
		return viewlist.size();
	}
	public boolean isViewFromObject(View arg0, Object arg1) {
		return arg0==arg1;
	}
public void destroyItem(ViewGroup container, int position, Object object) {
container.removeView(viewlist.get(position));
}
public Object instantiateItem(ViewGroup container, int position) {
container.addView(viewlist.get(position),0);
return viewlist.get(position);
}
}
